package com.yc.springmvc.core;

import javax.servlet.ServletConfig;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;

/**
 * @Auther: HuYang
 * @Date: 2022/11/1 - 11 - 01 - 14:36
 * @Description: com.yc.springmvc.core
 * @version: 1.0
 */

/**
 * 分发器
 */
public class DispatcherServlet extends HttpServlet {
    private String contextConfigLocation = "application.properties";
    private FrameworkCore frameworkCore;
    /**
     * 读取配置文件
     */
    @Override
    public void init(ServletConfig config) throws ServletException {
        String temp = config.getInitParameter("contextConfigLocation");
        if (!StringUtil.checkNull(temp)){
            //如果不为空,则用 用户给定的配置文件,否则用默认的
            contextConfigLocation = temp;
        }

        frameworkCore
    }

}
